const _ = require('lodash')

module.exports = class Request {
    constructor(url, {
        method,
        callback,
        useragent,
        referer,
        dupeFilter,
        cacheSeconds,
        writeCache,
        httpTimeout,
        httpRetry,
        attachment,
    }) {
        this.url = url
        this.method = _.defaultTo(method, 'GET')
        this.callback = callback
        this.useragent = useragent
        this.referer = referer
        this.dupeFilter = dupeFilter
        this.cacheSeconds = cacheSeconds
        this.writeCache = writeCache
        this.httpTimeout = httpTimeout
        this.httpRetry = httpRetry
        this.attachment = attachment
    }
}

